*     *****************************************************************   *;
*     *****************************************************************   *;
*   File-Name:  undisasteraid_final.do   	      			              *;
*   Date:       Dec 30, 2020                                       	      *;
*   Authors:    Dellmuth, Rosvold, Jönsson, Bender, and von Uexkull       *;
*   Purpose:    Replicate regression and prediction results in paper      *;
*   "Humanitarian Need Drives Multilateral Disaster Aid", Dellmuth et al. *;
*   2021 in PNAS													      *;
*   Input File: undisasteraid_final_forrep.dta                            *; 
*     ****************************************************************    *;
*     ****************************************************************    *;



* Content: Do-file for analyses in paper and supplementary appendix, except for 
* the out of sample predictions (see OOS_evaluations_final.do).


*Stata version used
********************************************************************************

vers 14.2 // Stata MP


*open data
********************************************************************************

use undisasteraid_final_forrep.dta


*Main text: Table 2
********************************************************************************

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree  conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000 /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree  conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree  conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*Multicollinearity? no issue, mean VIF of 2
collin mag1 ltotalaffectedemdata1000 totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree  conflict drought extmix flood storm
corr mag1 ltotalaffectedemdata1000 totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree  conflict drought extmix flood storm




*Appendix: Descriptive statistics presenting variables in the order they appear in paper
****************************************************************************************

encode unsc_rotating, gen(unsc_temp)

destring imfeff, gen(imf1) 
destring imfesf, gen(imf2) 
destring imffcl, gen(imf3) 
destring imfpll, gen(imf4) 
destring imfprgf, gen(imf5) 
destring imfsba, gen(imf6) 
destring imfpcl, gen(imf7) 

gen imf= imf1 +imf2+ imf3+ imf4+ imf5+ imf6+imf7
tab imf
replace imf=1 if imf==2
tab imf

gen us_sanction_d=(us_sanction==1)
replace us_sanction_d =1 if us_sanction==2

replace lp=ln(popdensfinal)

#delimit ; 
logout, save(diff) word replace:
tabstat cerfstmio cbpf_chf_cap_miost others_bil_ml_miost mag1 ltotalaffectedemdata1000 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree  conflict drought extmix flood storm
lgdppercapitappp tradeofgdp shdynmort corruptionpercind lp unsc_temp imf us_sanction_d idealpoint_distance
, stat(min mean max sd n) col(stat) format(%20.2f); 
#delimit cr

#delimit ; 
logout, save(corr) word replace:
corr mag1 ltotalaffectedemdata1000 totalsfi  ptassigned  p5colony ip_lnacorcount 
resid_emergoda agree  conflict drought extmix flood storm
; 
#delimit cr



*Robustness checks 
******************


*with GDP 

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi lgdppercapitappp ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi lgdppercapitappp ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi lgdppercapitappp ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2-gdp-S4.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*with trade in % of GDP 

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi tradeofgdp ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi tradeofgdp ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi tradeofgdp ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2-trade-S5.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*with infant mortality

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi shdynmort ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi shdynmort ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi shdynmort ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2_infmort-S6.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*with corruption

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi   corruptionpercind ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi   corruptionpercind ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi   corruptionpercind ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2-cpi-S7.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*with population density 

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi lp  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000   /// 
totalsfi lp  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
 , ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi lp  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2_lpopdens-S8.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*with interaction between total affected people and hazard severity 

gen ltotalaffectedemdata1000xmag1=ltotalaffectedemdata1000*mag1

tobit cerfstmio mag1 ltotalaffectedemdata1000 ltotalaffectedemdata1000xmag1 /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000 ltotalaffectedemdata1000xmag1 /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000 ltotalaffectedemdata1000xmag1 /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2_ltotalaffectedemdata1000xmag1-S9.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*Add strategic variables seprately

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
  totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
, ll(0)  vce(cluster country)
eststo cerfall

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
  totalsfi ptassigned  conflict drought extmix flood storm if e(sample) ///
, ll(0)  vce(cluster country)
eststo cerf1

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
  totalsfi   p5colony conflict  drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cerf2

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
  totalsfi  ip_lnacorcount conflict  drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cerf3

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
  totalsfi  resid_emergoda conflict drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cerf4

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
  totalsfi   agree conflict drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cerf5 

#delimit ;
esttab cerf1 cerf2 cerf3 cerf4 cerf5 cerfall  using table2-stepwise-cerf-S10.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	



tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// cbpf
  totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
, ll(0)  vce(cluster country)
eststo cbpfall

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// cbpf
  totalsfi ptassigned  conflict drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cbpf1

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// cbpf
  totalsfi   p5colony conflict  drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cbpf2

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// cbpf
  totalsfi  ip_lnacorcount conflict  drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cbpf3

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// cbpf
  totalsfi  resid_emergoda conflict drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cbpf4

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// cbpf
  totalsfi  agree conflict drought extmix flood storm  if e(sample) ///
, ll(0)  vce(cluster country)
eststo cbpf5

#delimit ;
esttab cbpf1 cbpf2 cbpf3 cbpf4 cbpf5 cbpfall  using table2-stepwise-cbpf-S11.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	



tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// bilateral
  totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda conflict agree drought extmix flood storm  ///
, ll(0)  vce(cluster country)
eststo bilateralall

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// bilateral
  totalsfi ptassigned  conflict drought extmix flood storm if e(sample) ///
, ll(0)  vce(cluster country)
eststo bilateral1

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// bilateral
  totalsfi   p5colony conflict  drought extmix flood storm if e(sample) ///
, ll(0)  vce(cluster country)
eststo bilateral2

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// bilateral
  totalsfi  ip_lnacorcount conflict  drought extmix flood storm if e(sample) ///
, ll(0)  vce(cluster country)
eststo bilateral3

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// bilateral
  totalsfi  resid_emergoda conflict drought extmix flood storm if e(sample) ///
, ll(0)  vce(cluster country)
eststo bilateral4

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// bilateral
  totalsfi   agree conflict drought extmix flood storm if e(sample) ///
, ll(0)  vce(cluster country)
eststo bilateral5

#delimit ;
esttab bilateral1 bilateral2 bilateral3 bilateral4 bilateral5 bilateralall  
using table2-stepwise-bilateral-S12.rtf, 
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	



* with UNSC

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree unsc_temp conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree unsc_temp conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree unsc_temp conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2-unsc-temp-S13.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


* with IMF

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree imf conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree imf conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree imf conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

esttab cerf cbpf other
#delimit ;
esttab cerf cbpf other using table2-imf-S14.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	



*Table 2 - w sanctions


tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree us_sanction_d conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree us_sanction_d conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree us_sanction_d conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2-sanctions-S15.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*controlling for a potential trend

gen trend=2017-year

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
  totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm  ///
trend, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
  totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
trend, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
  totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm ///
trend, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2.trend-S16.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	



*Cross-sectional logit

logit cerfd mag1 ltotalaffectedemdata1000  /// 
  totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict  drought extmix flood storm
eststo cerf 

logit cbpfd mag1 ltotalaffectedemdata1000  /// 
   totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm
eststo cbpf

logit otherd mag1 ltotalaffectedemdata1000  /// 
   totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm
eststo other 

#delimit ;
esttab cerf cbpf other using table2-logit-S17.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	



*Time-series cross-sectional logit

xtset year

xtlogit cerfd mag1 ltotalaffectedemdata1000  /// 
  totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm, fe 
eststo cerf 

xtlogit cbpfd mag1 ltotalaffectedemdata1000  /// 
  totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm, fe
eststo cbpf

xtlogit otherd mag1 ltotalaffectedemdata1000  /// 
  totalsfi ptassigned  p5colony ip_lnacorcount resid_emergoda agree conflict drought extmix flood storm, fe
eststo other 

#delimit ;
esttab cerf cbpf other using table2-xtlogit-S18.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


*lagging country variables by one year
sort country year
by country: gen conflictlag1 = conflict[_n-1]
by country: gen totalsfilag1 = totalsfi[_n-1]
by country: gen ptassignedlag1 = ptassigned[_n-1]
by country: gen ip_lnacorcountlag1 = ip_lnacorcount[_n-1]
by country: gen resid_emergodalag1 = resid_emergoda[_n-1]
by country: gen agreelag1 = agree[_n-1]

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
  totalsfilag1  ptassignedlag1  p5colony ip_lnacorcountlag1 resid_emergodalag1 agreelag1 conflictlag1 drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
  totalsfilag1  ptassignedlag1  p5colony ip_lnacorcountlag1 resid_emergodalag1 agreelag1 conflictlag1 drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
  totalsfilag1  ptassignedlag1  p5colony ip_lnacorcountlag1 resid_emergodalag1 agreelag1 conflictlag1 drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2.lags-S19.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	


* with ideological distance

tobit cerfstmio mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda idealpoint_distance  conflict drought extmix flood storm  ///
, ll(0) cluster(country)
eststo cerf

tobit cbpf_chf_cap_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda idealpoint_distance  conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo cbpf

tobit others_bil_ml_miost mag1 ltotalaffectedemdata1000  /// 
totalsfi  ptassigned  p5colony ip_lnacorcount resid_emergoda idealpoint_distance  conflict drought extmix flood storm ///
, ll(0) cluster(country)
eststo other 

#delimit ;
esttab cerf cbpf other using table2-idealpoint_distance-S21.rtf,  
starlevels(* .05 ** .01 *** .001) b(%9.3f) scalars(ll N) bic nodepvars 
p(%9.3f) replace;
#delimit cr	



*Figure S1

sum cerfstmio cbpf_chf_cap_miost others_bil_ml_miost emergencyodamiost totalodastmio if year==2017
preserve 
drop country
encode iso, gen(country)
collapse cerfstmio (sum) cbpf_chf_cap_miost (sum) others_bil_ml_miost (sum) totalstmio (mean) emergencyodamiost (mean) totalodastmio, by(country year)
collapse cerfstmio (sum) cbpf_chf_cap_miost (sum) others_bil_ml_miost (sum) totalstmio (sum) emergencyodamiost (sum) totalodastmio, by(year)
tsset year 
set scheme plotplain 
*tsline totalstmio emergencyodamiost 
drop if year<2006
twoway (line totalstmio year, c(l) ) ///
       (line emergencyodamiost year, c(l) )  
